using System.Collections.Concurrent;
using System.Runtime.CompilerServices;

internal class o
{
	public static int a;

	private int m_b;

	private ConcurrentStack<y> m_c = new ConcurrentStack<y>();

	static o()
	{
	}

	public o(int A_0, int A_1)
	{
		this.m_b = A_1;
		for (int num = 0; num < A_0; num++)
		{
			this.m_c.Push(a());
		}
	}

	[SpecialName]
	public int c()
	{
		return this.m_c.Count;
	}

	private y a()
	{
		return new y(this.m_b);
	}

	public y d()
	{
		if (!this.m_c.TryPop(out var result))
		{
			return a();
		}
		return result;
	}

	public void a(y A_0)
	{
		if (A_0 != null)
		{
			if (A_0.f != null)
			{
				A_0.f.c = null;
			}
			A_0.b();
			this.m_c.Push(A_0);
		}
	}

	public void b()
	{
		this.m_c.Clear();
	}
}
